/*    */ package com.zimbra.cs.mailbox.lock;
/*    */ 
/*    */ import java.util.concurrent.locks.ReentrantReadWriteLock;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class ZLock
/*    */   extends ReentrantReadWriteLock
/*    */ {
/*    */   private static final long serialVersionUID = 6961797355322055852L;
/*    */   
/*    */   public void printStackTrace(StringBuilder out)
/*    */   {
/* 35 */     Thread owner = getOwner();
/* 36 */     if (owner != null) {
/* 37 */       out.append("Write Lock Owner - ");
/* 38 */       printStackTrace(owner, out);
/*    */     }
/* 40 */     int readCount = getReadLockCount();
/* 41 */     if (readCount > 0) {
/* 42 */       out.append("Reader Count - " + readCount + "\n");
/*    */     }
/* 44 */     for (Thread waiter : getQueuedThreads()) {
/* 45 */       out.append("Lock Waiter - ");
/* 46 */       printStackTrace(waiter, out);
/*    */     }
/*    */   }
/*    */   
/*    */   protected void printStackTrace(Thread thread, StringBuilder out) {
/* 51 */     out.append(thread.getName());
/* 52 */     if (thread.isDaemon()) {
/* 53 */       out.append(" daemon");
/*    */     }
/* 55 */     out.append(" prio=").append(thread.getPriority());
/* 56 */     out.append(" id=").append(thread.getId());
/* 57 */     out.append(" state=").append(thread.getState());
/* 58 */     out.append('\n');
/* 59 */     for (StackTraceElement el : thread.getStackTrace()) {
/* 60 */       out.append("\tat ").append(el.toString()).append('\n');
/*    */     }
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/mailbox/lock/ZLock.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */